<?php
$id = empty($_GET['id']) ? 0 : intval($_GET['id']);
if($id > 0){
	##$__oManager = new Manager();
	$manager_info = $__oManager->get_row($id, '*');
}else{
	$manager_info['role'] = isset($_GET['role']) ? intval($_GET['role']) : 0;
}

$oRole = new Role();
$roles = $oRole->getAllRoles('`id`,`rolename`');
$role_arr = array();
foreach($roles['list'] as $row){
	if($row['rolename'] == 'root')continue;
	$role_arr[$row['id']] = $row['rolename'];
}
$manager_info['role_options'] = make_options($role_arr, false, $manager_info['role']);

$vars['info'] = $manager_info;
?>